﻿update tblLookup set [Description] = 'current-magazine' where LookUpID = 11

GO


GO
/****** Object:  StoredProcedure [dbo].[Get_LookUpByCode]    Script Date: 02/04/2012 22:06:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
--exec [GetMenu] ''
-- =============================================
CREATE PROCEDURE [dbo].[GetMenu]
	@Url varchar(150)
AS
BEGIN
	
 DECLARE @LogoId INT;  

 SELECT TOP 1 @LogoId = li.id     
 FROM LogoInformation li     
 WHERE     
  li.Url= case when @Url = '' then li.Url else ISNULL(@Url,li.Url) end
  AND (li.isDeleted is null OR li.isDeleted = 0 )    
  AND IsActive = 1
 ORDER BY ID DESC  

select * from tblLookup t
where LookUpCode = 'Menu'
and LookUpID in (
	select MenuId from LogoDetail ld 
	inner join LogoInformation li
	on li.Id = @LogoId
)

--select * from LogoInformation

END

